<?php defined('KOOWA') or die ?>

<form action="<?= @route(array('oid'=>$actor->id))?>" method="post">
	<input type="hidden" action="add" />
	<div>
		Question:<br />
		<textarea name="question" value=""></textarea>
	</div>
	<div>
		Answer1<br />
		<textarea name="choices[1]" value=""></textarea>
	</div>
	<div>
		Answer2<br />
		<textarea name="choices[2]" value=""></textarea>
	</div>
	<div>
		Answer3<br />
		<textarea name="choices[3]" value=""></textarea>
	</div>
	<div>
		Answer4<br />
		<textarea name="choices[4]" value=""></textarea>
	</div>
	<button type="submit">Create</button>			
</form>

<?php foreach($actor->questions as $question) : ?>
	<div>
		<h1><?= $question->title ?></h1>
		<ul>
		<?php foreach($question->choices as $choice) : ?>
			<li><?= $choice->title ?></li>
		<?php endforeach;?>
		</ul>	
	</div>
<?php endforeach;?>